package com.example.springboot.config.event.transaction;

import com.example.springboot.entity.User;
import org.springframework.context.ApplicationEvent;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/9/26 16:25
 */
public class UserCreateEvent extends ApplicationEvent {
    private User user;

    /**
     * Create a new {@code ApplicationEvent}.
     *
     * @param source the object on which the event initially occurred or with
     *               which the event is associated (never {@code null})
     */
    public UserCreateEvent(Object source) {
        super(source);
        this.user = (User) source;
    }

    public User getUser() {
        return user;
    }
}
